package com.yupi.springbootinit.datasource;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.springbootinit.model.entity.Video;
import com.yupi.springbootinit.service.VideoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 视频服务实现类
 * @author gan
 * @date 2023/4/20 15:43
 */
@Service
public class VideoDataSource implements DataSource<Video> {

    @Resource
    VideoService videoService;

    @Override
    public Page<Video> doSearch(String searchText, long pageNum, long pageSize) {
        return videoService.searchVideo(searchText, pageNum, pageSize);
    }
}
